package kr.hkit.powerjava.alone;

import java.util.Scanner;

import kr.hkit.powerjava.alone.dao.AccountDao;
import kr.hkit.powerjava.alone.dao.UserDao;
import kr.hkit.powerjava.alone.service.AccountService;
import kr.hkit.powerjava.alone.service.UserService;

public class ATM {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		boolean flag = true;

		while (flag) {
			System.out.println("1.사용자메뉴 2.계좌메뉴 3.종료");
			switch (sc.nextInt()) {
			case 1:
				new UserService(new UserDao(), sc);
				break;
			case 2:
				new AccountService(new AccountDao(), sc);
				break;
			default:
				flag = false;
				sc.close();
			}
		}
	}
}
